<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fns" uri="/WEB-INF/tlds/fns.tld" %>
<c:set var="ctxStatic" value="${pageContext.request.contextPath}/static"/>
<c:set var="ctx" value="${pageContext.request.contextPath}${fns:getAdminPath()}"/>
<c:set var="ctxMobileSite" value="${pageContext.request.contextPath}/site"/>
<c:set var="ctxStatic" value="${pageContext.request.contextPath}/static"/>
<c:set var="ctxImages" value="${pageContext.request.contextPath}/userfiles/project"/>
<c:set var="ctxUser" value="${pageContext.request.contextPath}/userfiles"/>
<c:set var="ctxRoot" value="${pageContext.request.contextPath}"/>
<c:set var="ctxTheme" value="${fns:getCache('theme', theme)}"/>

<!DOCTYPE html>
<html style="overflow-x:hidden;overflow-y:auto;"><head>
    <title>${project.name }</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">        
<!-- Mobile Devices Support @begin -->
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<meta content="no-cache,must-revalidate" http-equiv="Cache-Control">
<meta content="no-cache" http-equiv="pragma">
<meta content="0" http-equiv="expires">
<meta content="telephone=no, address=no" name="format-detection">
<meta name="apple-mobile-web-app-capable" content="yes"> <!-- apple devices fullscreen -->
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
  
<script src="${ctxStatic}/jquery/jquery-1.9.1.min.js" type="text/javascript"></script>
  <link rel="stylesheet" type="text/css" href="${ctxStatic}/site/themes/QiCheFuWu/common.css" media="all">
<link rel="stylesheet" type="text/css" href="${ctxStatic}/site/themes/QiCheFuWu/home-19.css" media="all">	
<link rel="stylesheet" type="text/css" href="${ctxStatic}/site/themes/QiCheFuWu/ny.css" media="all">
<link href="${ctxStatic}/jquery-validation/1.11.0/jquery.validate.min.css" type="text/css" rel="stylesheet" />
<script src="${ctxStatic}/jquery-validation/1.11.0/jquery.validate.min.js" type="text/javascript"></script>
<script src="${ctxStatic}/jquery-validation/1.11.0/jquery.validate.method.min.js" type="text/javascript"></script>
<script type="text/javascript" src="${ctxStatic}/site/themes/QiCheFuWu/swipe.js"></script>
<script type="text/javascript">
$(document).ready(function() {
	$("#inputForm").validate({
	});
});

function getCarType(){
	 $("#cartype").html("  <option value=''>请选择</option>");
	var parentTypeId=$("#cartie").find("option:selected").attr("title");
	$.get("${ctxRoot}/CarOnlineSignUp/getCarTypeByParentId?parentTypeId="+parentTypeId, function(data){
		var html="";
		for(var i=0;i<data.length;i++){
			html+="  <option value="+data[i].name+">"+data[i].name+"</option>";
		}
		  $("#cartype").append(html);
		});
	
}

</script>
</head>
<body>
<div class="body">
<div class="navbar">
            <div class="ch3">智迅云服务后台</div>
            <div style="width:130px;position:absolute;top:5px;right:5px;z-index:10;">
	  <a class="nav-link" href="javascript:menu()"><span style="line-height:30px;foont-size:16px;">菜单</span></a>
		<div style="text-align: center; display: none;" id="menu">
          <div style="background-color:rgba(50,50,50,0.9);border-radius:5px;box-shadow:0 0 3px #333;">
              <ul id="menu_list">
                <li><a class="ui-link" href="${ctxMobileSite }/${project.id}?menuId=1"><div>首 页</div></a></li>                    
                <li><a class="ui-link" href="${ctxMobileSite }/${project.id}?menuId=2"><div>汽车预览</div></a></li>
                <li><a class="ui-link" href="${ctxMobileSite }/${project.id}?menuId=3"><div>公司动态</div></a></li>     
                <li><a class="ui-link" href="${ctxMobileSite }/${project.id}?menuId=7"><div class="autocut">联系我们</div></a></li> 
                <c:forEach items="${microPages }" var="microPage">
				<li><a class="ui-link" href="${ctxMobileSite }/viewPage/${microPage.id }"><div class="autocut">${microPage.name }</div></a></li>	
				</c:forEach>
              </ul>
          </div>
      </div>
<script>
	function menu(){
		$('#menu').toggle()
	}
</script>
	    </div>
        </div>
     <section>
	   <div class="ct80">
          <dl class="list_book list_book_des">
              <dd>
                  <div><label>重要声明</label></div>
                  <div style="word-break:break-all;word-wrap:nowrap;white-space:normal;padding: 10px 5px;font-size:14px;">欢迎您预约参与免费试驾，亲身体验纯粹驾驶乐趣。在收到您的微信订单后，客服人员将会尽快与您联系。<br>
                  通过填写此份报名电子表单，您已确保您输入的信息真实、有效；并且您同意经销商通过您预留的联络方式与您联系。经销商将保护您的个人隐私，不会将您的信息泄露给任何第三方。<br>
                  表单中的选项均为必填项，烦请输入完整，否则将无法预约受理。如因信息填写错误造成您无法预约试        乘试驾，经销商不承担任何责任。</div>
              </dd>
          </dl>
      </div>
      <div class="ct80">
         <form:form id="inputForm" modelAttribute="carOnlineUpkeep" action="${ctxRoot}/CarOnlineSignUp/saveUpKeep" method="post" class="form-horizontal">
         <input type="hidden" value="${project.id}" name="proj_id">
         <input type="hidden" value="${project.user.id}" name="user.id">
          <input type="hidden" value="${memberId}" name="memberId">
         <input type="hidden" value="${wechatId}" name="wechatId">
              <dl class="list_book">
                  <dt><label>请认真填写表单</label></dt>
                  <dd class="tbox">
                      <div><label>联系人:</label></div>
                      <div><input name="name" placeholder="" value="" type="text" class="required"></div>
                  </dd>
                   <dd class="tbox">
                      <div><label>联系电话：</label></div>
                      <div><input name="mobile" placeholder="" value="" type="text" class="required digits"></div>
                  </dd>
                  <dd class="tbox">
                      <div><label>车牌：</label></div>
                      <div><input name="carNumber" placeholder="" value="" type="text" class="required digits"></div>
                  </dd>
                  <dd class="tbox">
                      <div><label>公里数：</label></div>
                      <div><input name="kilometres" placeholder="" value="" type="text" class="required number"></div>
                  </dd>
                               <dd class="tbox">
                      <div><label>车系</label></div>
                      <div>
						<select name="cartie" id="cartie"  class="input-medium required" onchange="getCarType();" >
						
                        <option value="">请选择</option>
                        <c:forEach items="${carTypeList }" var="carType">
                        <option value="${carType.name }"  title="${carType.id }">${carType.name }</option>
                        </c:forEach>
                        </select>
					  </div>
					</dd>
                    <dd class="tbox">
                        <div><label>车型</label></div>
                        <div>
                        <select id="cartype" name="cartype"  class="input-medium required">
                        <option value="">请选择</option>
                        </select>
                        </div>
                    </dd>
                    <dd class="tbox">
                        <div><label>预约类型</label></div>
                        <div>
                        <select name="signupType" id="" class="input-medium required">
                        <option value="">请选择</option>
                        <option value="0">常规保养</option>
                        <option value="1">事故维修	</option>
                        <option value="2">一般小修</option>
                        <option value="3">紧急救援</option>
                        </select>
                        </div>
                    </dd>
                    <dd class="tbox">
                      <div><label>预约日期：</label></div>
                      <div>
						<script src="${ctxStatic}/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
						<input id="createTime" name="signupTime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate required"
							onclick="WdatePicker({dateFmt:'yyyy-MM-dd ',isShowClear:false});"/>  
					</div>
                     </dd>
					<dd class="tbox">
                      <div><label>备注：</label></div>
                      <div><textarea name="remarks" placeholder=""></textarea></div>
					</dd>
                    <div style="margin:10px;text-align: center;">
					<input value="立即预约" class="btn" style="margin:10px auto;text-align: center;" type="submit">
						</div>
						</dl>
						
					</form:form>
				</div>
			</section>
         <footer>
            <div class="footer">
                <a href="">© ${project.companyName }</a>
                <a style=" ;display:block;" class="weiba-support tpl-support">技术支持:博信科技</a>
            </div>
        </footer>
   </div>          
</body>
</html>
